package com.sbck.cs3.fragment;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.Nullable;

import com.sbck.cs3.R;


public class AboutFragment extends Fragment {

    DeviceSelectFragment deviceSelectFragment;

    LoginFragment loginFragment;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_about, container, false);

        deviceSelectFragment = new DeviceSelectFragment();
        loginFragment = new LoginFragment();

        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        Button button = view.findViewById(R.id.Btn_About_Return);
        // Inflate the layout for this fragment
        button.setOnClickListener(view1 -> {
            getFragmentManager().beginTransaction().replace(R.id.fl_DeviceSelect_container, deviceSelectFragment).commitNowAllowingStateLoss();

        });

    }
}